package com.list88zhu.android.sunflower.api;

import java.util.Map;

import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.HeaderMap;
import retrofit2.http.POST;
import retrofit2.http.QueryMap;
import retrofit2.http.Url;

/**
 * <pre><code>
 *
 *  </code></pre>
 *
 * @author zhuyingming@qmtv.com
 * @date 2018/9/8
 */
public interface ApiService {

    @GET()
    ResponseBody get(@Url() String url,
                     @HeaderMap Map<String, String> headers,
                     @QueryMap Map<String, String> params);

    @FormUrlEncoded
    @POST()
    ResponseBody post(@Url() String url,
                      @HeaderMap Map<String, String> headers,
                      @FieldMap Map<String, String> params);

    @POST()
    ResponseBody post(@Url() String url,
                      @HeaderMap Map<String, String> headers,
                      @Body Object param);
}
